package com.matthicks.macrobot;

public class ExecutionProgress {
	private Integer percent;
	private String status;
	private Runnable receiver;

	public void set(Integer percent, String status) {
		this.percent = percent;
		this.status = status;
		
		if (receiver != null) {
			receiver.run();
		}
	}
	
	public Integer getPercent() {
		return percent;
	}
	
	public void setPercent(Integer percent) {
		this.percent = percent;
		
		if (receiver != null) {
			receiver.run();
		}
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
		
		if (receiver != null) {
			receiver.run();
		}
	}

	public Runnable getReceiver() {
		return receiver;
	}

	public void setReceiver(Runnable receiver) {
		this.receiver = receiver;
	}
}